package com.yxw.live_vod_boot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yxw.live_vod_facade.dto.PageOnDemandCommentDTO;
import com.yxw.live_vod_boot.entity.YxOnDemandCommentEntity;
import com.yxw.live_vod_facade.vo.OnDemandCommentVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 点播评论管理
 * @author liuxin
 * @date 2023.11.22
 */
@Repository
public interface OnDemandCommentMapper extends BaseMapper<YxOnDemandCommentEntity> {

    /**
     * 查询与我相关的直播评论或者回复
     * @param page
     * @param dto
     * @return
     */
    List<OnDemandCommentVO> selectRelatedComments(Page<OnDemandCommentVO> page,@Param("dto") PageOnDemandCommentDTO dto);

    /**
     * 查询视频下面的评论和回复
     * @param page
     * @param dto
     * @return
     */
    List<OnDemandCommentVO> selectVideoComments(Page<OnDemandCommentVO> page, @Param("dto") PageOnDemandCommentDTO dto);

    /**
     * commentId
     * @param commentId
     */
    void deleteCommentById(@Param("commentId") Long commentId);
}
